﻿using AutoMapper;
using Domain;
using Server.API.Application.Command.Breed;
using Server.API.Application.Command.DeepProcess;
using Server.API.Application.Command.Goods;
using Server.API.Application.Command.Kill;
using Server.API.DTOs;

namespace Server.API
{
    /// <summary>
    /// 指定映射关系
    /// </summary>
    public class AutomapperFiles:Profile
    {
        // 映射关系
        public AutomapperFiles()
        {
           
            //商品添加
            CreateMap<AddGoodsCommand, GoodsModel>(); 
            //商品查询
            CreateMap<GoodsModel, GoodDTO>();
            //商品修改
            CreateMap<GoodsUpdateCommand, GoodsModel>();
            //商品反填
            CreateMap<GoodsModel, GoodDTO>();
            //养殖反填
            CreateMap<BreedModel, BreedDTO>();
            //养殖修改
           CreateMap<UpdateBreedCommand, BreedModel>();
            //养殖查询
            CreateMap<BreedModel, BreedDTO>();
            //屠宰反填
            CreateMap<KillModel, KillDTO>();
            //屠宰修改
            CreateMap<UpdateKillCommand, KillModel>();
            //深加工查询
            CreateMap<DeepProcessModel, DeepProcessDTO>();
            //深加工修改
            CreateMap<UpdateDeepProcessCommand, DeepProcessModel>();
        }
        
    }
}
